package com.jasonjan.jiance.module.search.main;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.jasonjan.jiance.R;
import com.jasonjan.jiance.global.InitApp;
import com.jasonjan.jiance.module.base.BaseActivity;
import com.jasonjan.jiance.module.search.test.activity.AnalogyExaminationActivity;

public class TestSearchActivity extends BaseActivity {

    private static final String TAG = "TestSearchActivity";
    private String flag="";
    private TextView NE_tv;
    private TextView SE_luyou;
    private TextView SE_yuanqu;
    private TextView SE_guangyu;
    private TextView TE_bishi;

    public static void launch(String flag) {
        InitApp.AppContext.startActivity(new Intent(InitApp.AppContext, TestSearchActivity.class)
                .putExtra("flag",flag)
                .addFlags(Intent.FLAG_ACTIVITY_NEW_TASK));
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_search_test);
        setTitle("模拟测试");
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        initView();
        initData();
    }

    private void initView(){
        NE_tv=(TextView) findViewById(R.id.NE_tv);
        SE_luyou=(TextView) findViewById(R.id.SE_luyou_tv);
        SE_yuanqu=(TextView) findViewById(R.id.SE_yuanqu_tv);
        SE_guangyu=(TextView) findViewById(R.id.SE_guangyu_tv);
        TE_bishi=(TextView) findViewById(R.id.TE_bishi_tv);
    }

    private void initData(){
        NE_tv.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                AnalogyExaminationActivity.launch("NE_tv");
            }
        });

        SE_luyou.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                AnalogyExaminationActivity.launch("SE_luyou");
            }
        });

        SE_yuanqu.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                AnalogyExaminationActivity.launch("SE_yuanqu");
            }
        });

        SE_guangyu.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                AnalogyExaminationActivity.launch("SE_guangyu");
            }
        });

        TE_bishi.setOnClickListener(new View.OnClickListener(){
            @Override
            public void onClick(View v){
                AnalogyExaminationActivity.launch("TE_bishi");
            }
        });
    }


}
